package edu.sctu.practice.class02.qiuyangyang.text02;

/**
 * Created by Administrator on 2015/10/9 0009.
 */
public class Vehicle {
    public int speed;
    public int size;

    public Vehicle(int speed, int size) {
        this.speed = speed;
        this.size = size;
    }

    public void setMove() {
        System.out.println("车辆正移动");
    }

    public int setSize() {
        return size;
    }

    public int setSpeed() {
        return speed;
    }

    public int speedUp() {
        return speed + 40;
    }

    public int speedDown() {
        return speed - 60;
    }

    public static void main(String[] args) {

        Vehicle run = new Vehicle(80, 3);

        System.out.println("该车的速度为" + run.speed);

        System.out.println("该车的轴距为" + run.size);

        System.out.println("该加速后为" + run.speedDown());

        System.out.println("该车减速后为" + run.speedUp());
    }
}
